#include "queue.h"
/*the max lenth of string */
#define MAXLINE 63

/* arguments for function in thread*/
typedef struct q_arg
{
  Queue* inputQ;/*input queue*/
  Queue* outputQ;/*output queue*/
}Args;


typedef enum type {EOFILE=1,EOLINE,NOPRINTABLE,PRINTABLE,NULLCHAR} charType;
/*
*if a char is letter
*/
int check_char(char ch);
/*
*if a char is EOF,'\n',printable character or noprintable character
*/
charType check_type(int ch);
/*
* reader thread function,read from stdin
*/
void* reader();
/*
* munch1 thread function,replace ' ' with '*'
*/
void* munch1();
/*
* munch2 thread function,convert letter in string to upper letter
*/
void* munch2();
/*
* writer thread function,write to stdout and count string number
*/
void* writer();
/*
*construct a new Element,element->string=content,
*element->size=size;
*element->eof=eof;
*the eof = 0 only used when the reader notify other threads
*should exit
*/
Element* new_element(char* content,int size ,int eof);

